program main
  use openacc!GlobalVarsModule
  type :: domain
    integer, allocatable:: v1(:)
    integer :: aa(10)
  end type domain
  type(domain) :: grid
  integer :: nx, ny, nz
  integer :: a(10),j
  integer, allocatable :: b(:) 
  real :: x 
  character(len=4) :: s  ! 长度 4，刚好容纳 "qwer"

  s = "qwer"  ! 直接赋值
  nx = 10 
  allocate(grid%v1(10))
  allocate(b(nx))
 !$acc enter data create(a)!copyin(a)

  !$acc parallel
  do j = 1, nx
    a(j) = 1
  end do  
  !$acc end parallel
 
 !$acc exit data copyout(a)
end program
